package com.hongyue.zuoTi6;

public class Demo {
    public static void main(String[] args) {
        String a = "积分看电视了几分我特朗普将反恐文件风IE哦特朗普积分哦忘记特朗普";
        a = a.replace("特朗普", "***");
        System.out.println(a);
        String b = "积分看电视普京了几分我特朗普将反恐文件风IE哦特朗普积分哦忘记普京";
        String[] keyArray = {"特朗普", "普京"};
        for (int i = 0; i < keyArray.length; i++) {
            b = b.replace(keyArray[i], "***");
        }
        System.out.println(b);
    }
}
